home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / FILES.SWG / 0012_MAXFILES.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  941b  |  34 lines

  1. {
  2. >I'm searching For a possibility to access more then 20 (I don't know the exact
  3. >number) Files at once With TP 7.0 (Real mode). I'll be happy if anyone can post
  4. >me sourcecode and technical information - technical information alone would be
  5. >enough, too.
  6.  
  7. Boland Magazin 6/92 (Hot Line) Writes:
  8.  
  9. There is error in Dos: it's equal what you in Config.sys after Files= Write,
  10. it can manage only 15 (!) open Files. Here is an Unit to outwit it:
  11. (should be as first, can be not in overlay, entry also in config.sys)
  12. }
  13.  
  14. Unit maxFiles;
  15.  
  16. Interface
  17.  
  18. Const
  19.   maxFile = 255;
  20.   {for 250 open Files}
  21. Var
  22.   index: Integer;
  23.   puffer: Array[1..maxFile] of Byte;
  24.  
  25. begin
  26.   For index := 1 to maxFile do
  27.     puffer[index] := $FF;
  28.   For index := 1 to 5 do
  29.     puffer[index] := mem[prefixseg:$18 + pred(index)];
  30.   memw[prefixseg:$32] := maxFile;
  31.   memw[prefixseg:$34] := ofs(puffer);
  32.   memw[prefixseg:$36] := seg(puffer);
  33. end.
  34.